/**
*@description 用户画像》营销创意偏好》整体互动意愿
*@author yhw
*/
import React, { Component, PropTypes } from 'react';
import { routerRedux } from 'dva/router';
import { connect } from 'dva';
import MainLayout from '../components/MainLayout/MainLayout';
import BarSimple from '../components/Persons/BarSimple';
import TableList from '../components/TableList';
import {Card, Icon, Tooltip, Row, Col} from 'antd';

const tips1 = (<div>整体互动意愿&nbsp;
  <Tooltip placement="right" title="整体互动意愿">
          <Icon type="question-circle-o" />
  </Tooltip></div>);

class Marketing extends Component {
  constructor(props) {
      super(props);
  }
  // 获取数据
  fetchData(type, search){
    this.props.dispatch({
            type: type,
            payload: search
    })
  };
  initData(){
    this.fetchData('Marketing/marketingQuery','');
  };
  componentWillMount() {
    this.initData();
  };
  render(){
  return (
    <MainLayout>
        <Row gutter={16} style={{marginTop:"29px"}}>
              <Col className="gutter-row" span={16}>
              <div className="gutter-box">
                        <Card title={tips1}>
                              <BarSimple seriesName="整体互动意愿" data={this.props.Marketing.marketingData} loading={this.props.Marketing.marketingLoading} width={"100%"} height={659} />
                        </Card>
              </div>
              </Col>
              <Col className="gutter-row" span={8}><div className="gutter-box"><TableList pageSize={18} /></div></Col>
        </Row>
    </MainLayout>
  );
  }
};

Marketing.propTypes = {
};

function mapStateToProps({ Marketing }) {
  return {
    Marketing: {...Marketing},
  };
}

export default connect(mapStateToProps)(Marketing);